<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="LibreOffice 3.5  (Linux)">
	<META NAME="AUTHOR" CONTENT="Vaclav Naydionov">
	<META NAME="CREATED" CONTENT="20130616;23221500">
	<META NAME="CHANGEDBY" CONTENT="Vaclav Naydionov">
	<META NAME="CHANGED" CONTENT="20130616;23232700">
	<STYLE TYPE="text/css">
	<!--
		@page { size: 21cm 29.7cm; margin: 2cm }
		P { margin-bottom: 0.21cm }
		H1 { margin-bottom: 0.21cm; page-break-after: avoid }
		H1.western { font-family: "Times New Roman", serif; font-size: 24pt; font-weight: bold }
		H1.cjk { font-family: "Droid Sans Fallback"; font-size: 24pt; font-weight: bold }
		H1.ctl { font-family: "Lohit Hindi"; font-size: 24pt; font-weight: bold }
		H2 { margin-bottom: 0.21cm; page-break-after: avoid }
		H2.western { font-family: "Times New Roman", serif; font-size: 18pt; font-weight: bold }
		H2.cjk { font-family: "Droid Sans Fallback"; font-size: 18pt; font-weight: bold }
		H2.ctl { font-family: "Lohit Hindi"; font-size: 18pt; font-weight: bold }
		A:link { color: #000080; so-language: zxx; text-decoration: underline }
		TT.western { font-family: "Droid Sans Mono", monospace }
		TT.cjk { font-family: "Droid Sans Fallback", monospace }
		TT.ctl { font-family: "Lohit Hindi", monospace }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" LINK="#000080" VLINK="#800000" DIR="LTR">
<H1 CLASS="western">ABOUT</H1>
<P>YB.ORM tool is developed to simplify for C++ developers creation
of applications that work with relational databases. An
Object-Relational Mapper (ORM) works by mapping database tables to
classes and table records to objects in some programming language.
This approach may be not optimal for each and every database
application, but it proved to be reasonable in applications that
require complex logic and transaction handling. The goals of YB.ORM
project are: provide a convenient API for C++ developers, retain high
performance of C++, keep the source code easily portable across
different platforms, support most major relational DataBase
Management Systems (DBMS). 
</P>
<P>Typical usage scenario is the following: 
</P>
<UL>
	<LI><P>Describe your database schema i.e.
	tables with their columns and relationships between tables in <A HREF="XmlFormat.en.html">simple
	XML-based format</A>. 
	</P>
	<LI><P>Use the code generation tool
	provided to produce C++ domain classes for your tables (see
	<A HREF="Tutorial1.en.html">Tutorial1</A>).
		</P>
	<LI><P>Add your application-specific
	logic to the classes. 
	</P>
	<LI><P>Should you make changes to the
	database schema, you then use the code generation tool to
	synchronize previously generated C++ classes with the schema. 
	</P>
	<LI><P>Optionally, use the code
	generation tool to issue SQL statements to populate your empty
	database schema with tables. 
	</P>
	<LI><P>Now you can use the domain classes
	in cooperation with Session object to automate the following tasks: 
	</P>
	<UL>
		<LI><P>create new objects or delete
		existing objects; 
		</P>
		<LI><P>query objects from database,
		using object-based queries (see <A HREF="Tutorial3.en.html">Tutorial3</A>);
				</P>
		<LI><P>modify existing objects by just
		assignment to objects' fields; 
		</P>
		<LI><P>link and unlink objects to/from
		each other using relations (see <A HREF="Tutorial2.en.html">Tutorial2</A>);
				</P>
		<LI><P>serialize your objects into XML and JSON. 
		</P>
	</UL>
</UL>
<P>This tool employs many ideas explained in the book &quot;Patterns
of Enterprise Application Architecture&quot; by Martin Fowler. Such
patterns as &quot;Lazy Load&quot;, &quot;Identity Map&quot;, &quot;Unit
of Work&quot;, etc. Also, the project development was inspired by the
power of <A HREF="http://www.hibernate.org/">Hibernate</A> framework
for Java, and especially by the design of <A HREF="http://www.sqlalchemy.org/">SQLAlchemy</A>
for Python. Some details of how it works are here: <A HREF="Internals.en.html">Internals</A>.
</P>
<H2 CLASS="western"><A NAME="STATUS"></A>STATUS</H2>
<P>At the moment, YB.ORM tool works in Linux, Mac OS X and Windows.
It can be built using the following compilers: <A HREF="http://gcc.gnu.org/">GCC</A>,
<A HREF="http://clang.llvm.org/">CLang</A>, <A HREF="http://mingw.org/">MinGW</A>,
<A HREF="http://www.microsoft.com/visualstudio/">MSVC 2013/2010/2008</A>,
see <A HREF="Build.en.html">Building
Instructions</A>. 
</P>
<P>You can build YB.ORM library against your toolkit of choice:
<A HREF="http://www.boost.org/">Boost</A>, <A HREF="http://qt-project.org/">Qt</A>,
or <A HREF="http://www.wxwidgets.org/">wxWidgets</A>; their native
data types will be used for strings, date and time, threads, XML
parsing, etc. 
</P>
<P>The tool was tested to work with the following SQL databases:
<A HREF="http://www.mysql.com/">MySQL</A>, <A HREF="http://www.oracle.com/technetwork/products/express-edition/">Oracle</A>,
<A HREF="http://www.sqlite.org/">SQLite</A>, <A HREF="http://www.firebirdsql.org/">Firebird</A>,
<A HREF="http://www.postgresql.org/">Postgres</A>. To connect to a
database you have these options: 
</P>
<UL>
	<LI><P><A HREF="http://www.unixodbc.org/">ODBC</A>
	drivers 
	</P>
	<LI><P>popular database connectivity C++
	library <A HREF="http://soci.sourceforge.net/">SOCI</A> 
	</P>
	<LI><P>database drivers for Qt library:
	<A HREF="http://qt-project.org/doc/qt-4.8/qtsql.html">QtSql</A> 
	</P>
	<LI><P>there is native driver for SQLite. 
	</P>
</UL>
<P>Optionally, use connection pooling the library provides. Look here
for details: <A HREF="SqlDriver.en.html">Connecting
to database</A>. 
</P>
<P>The basic functionality of YB.ORM was tested on several little
projects, and proved to be usable. Keep in mind, that the tool is
under development and its API may change between releases. Some
interesting features are still to be implemented (see <A HREF="ToDo.en.html">ToDo</A>
list). 
</P>
<H2 CLASS="western"><A NAME="AUTHORS"></A>AUTHORS</H2>
<P>Project has started in late 2006 as a part of billing system for
on-line ads at Yandex company (<A HREF="http://www.yandex.com/">http://www.yandex.com/</A>)
by Viacheslav Naydenov (me) and Sergey Chmelev. &quot;YB&quot; used
to stand for Yandex.Balance, the name for the billing system. Today
YB.ORM project is not affiliated with Yandex company. The source code
was released in early 2011 under open source license, since then the
code has been mostly rewritten. Thanks to the author of <A HREF="http://code.google.com/p/tiodbc/">tiny
odbc wrapper</A>, whose code is used as a base for the first usable
SQL driver (<TT CLASS="western">OdbcDriver</TT> class). Also, I would
like to mention the feedback and contribution from several students
of Moscow State Open University (MSOU), where I was using this piece
of software as a case study. The list of contributors: 
</P>
<UL>
	<LI><P>Viacheslav Naydenov, vaclav at
	yandex dot ru - main developer 
	</P>
	<LI><P>Sergey Chmelev, halty at yandex
	dash team dot ru - early contributor 
	</P>
	<LI><P>SqUe, squarious at gmail dot com -
	tiodbc code 
	</P>
	<LI><P>Nikita Buyvich, buyvich at gmail
	dot com - MSOU 
	</P>
	<LI><P>Viacheslav Fedorov, funny dash
	story at yandex dot ru - MSOU 
	</P>
	<LI><P>Andrey Skobenkov, andrey dot skobenkov at gmail dot com -
	MSOU 
	</P>
</UL>
<P>Any feedback, patches or comments are welcome! 
</P>
</BODY>
</HTML>
